package fch;

/**
 * Tests that the moveToPoint method of the MovingRobot class works as intended.
 * @author Christopher Foo
 *
 */
public class MovingRobotTester extends MovingRobot {
  @Override
  /**
   * Move the robot to the center of the battlefield, the bottom-right corner, and finally try
   * to move to a spot outside of the battlefield.
   */
  public void run() {
    
    //Move to center.
    moveToPoint(getBattleFieldWidth() / 2, getBattleFieldHeight() / 2);
    
    //Move to bottom-right corner.
    moveToPoint(getBattleFieldWidth(), 0);
    
    //Try to move to a point outside of the battlefield.
    //Test past the top wall.
    moveToPoint(getBattleFieldWidth() / 2, getBattleFieldHeight() + 100);
  }
}
